package com.lhy.tool.database.converter.mysql;

import com.lhy.tool.database.DateType;
import com.lhy.tool.database.DbColumnType;
import com.lhy.tool.database.converter.common.AbstractDbDateTimeConverter;

public class MysqlDateTimeConverter extends AbstractDbDateTimeConverter {

    @Override
    protected DbColumnType convert(DateType configDateType) {
        switch (configDateType) {
            case ONLY_DATE:
                return DbColumnType.DATE;
            case SQL_PACK:
                return DbColumnType.DATE_SQL;
            case TIME_PACK:
                return DbColumnType.LOCAL_DATE_TIME;
            default:
                return DbColumnType.STRING;
        }
    }
}
